#include <iostream>
#include <vector>
#include <iterator>
using namespace std;

#include "Heap.h"

typedef int				value_t;
typedef Max<value_t>	max_t;
typedef Min<value_t>	min_t;
typedef Heap<value_t,max_t>	max_heap_t;
typedef Heap<value_t,min_t>	min_heap_t;

int main (int, char * []){
	cout << "\n\tMax Heap " << endl << endl;
    min_heap_t minHeap;	
	minHeap << 700 << 500 << 100 << 800 << 200 << 400 << 900 << 1000 << 300 << 600;
	cout << minHeap << endl << endl;

	int minValue = 0;
	for ( int i = 0; i < minHeap.size(); i++ ) {
		minHeap >> minValue ;
		cout << "Min elementos = " << minValue << endl;
	}	


	cout << "\n\n\tMin Heap " << endl << endl;
	max_heap_t maxHeap;	
	maxHeap << 700 << 500 << 100 << 800 << 200 << 400 << 900 << 1000 << 300 << 600;
	cout << maxHeap << endl << endl;

	int maxValue = 0;
	for ( int i = 0; i < maxHeap.size(); i++ ){
		maxHeap >> maxValue ;
		cout << "Max elementos = " << maxValue << endl;
	}	
}